package com.xingda.packing.enums;

import lombok.Getter;

public enum BoxLocationNo {
    BOX01(1, 1),
    BOX02(2, 2),
    BOX03(3, 3),
    BOX04(4, 4),
    BOX05(5, 5),
    BOX06(6, 6),
    BOX07(7, 7),
    BOX08(8, 8),
    BOX09(9, 9),
    BOX10(10, 10),
    BOX11(11, 1),
    BOX12(12, 2),
    BOX13(13, 3),
    BOX14(14, 4),
    BOX15(15, 5),
    BOX16(16, 6),
    BOX17(17, 7),
    BOX18(18, 8),
    BOX19(19, 9),
    BOX20(20, 10),
    BOX99(99, 99);

    public static BoxLocationNo getById(int id) {
        for (BoxLocationNo value : BoxLocationNo.values()) {
            if (value.getId() == id) {
                return value;
            }
        }
        return BOX99;
    }

    BoxLocationNo(
            int id, int no) {
        this.id = id;
        this.no = no;
    }

    @Getter
    private final int id;
    @Getter
    private final int no;
}
